<h2>DESCRIPTION</h2>

<i>HIS</i> stands for hue, intensity, and saturation. 
This program produces red, green and blue raster map layers
providing a visually pleasing combination of hue,
intensity, and saturation values from two or three
user-specified raster map layers.

<p>
The human brain automatically interprets the vast amount of
visual information available according to basic rules. 
Color, or <i>hue</i>, is used to categorize objects. 
Shading, or <i>intensity</i>, is interpreted as
three-dimensional texturing. Finally, the degree of
haziness, or <i>saturation</i>, is associated with
distance or depth. This program allows data from up to
three raster map layers to be combined into a color image
(in the form of separate red, green and blue raster map
layers) which retains the original information in terms of
<i>hue</i>, <i>intensity</i>, and <i>saturation</i>.

<p>
While any raster map layer can be used to represent the hue
information, map layers with a few very distinct colors
work best.  Only raster map layers representing
continuously varying data like elevation, aspect, weights,
intensities, or amounts can suitably be used to provide
intensity and saturation information.

<p>
For example, a visually pleasing image can be made by using
a watershed map for the <i>hue</i> factor, an aspect map
for the <i>intensity</i> factor, and an elevation map for
<i>saturation</i>. (The user may wish to leave out the
elevation information for a first try.) Ideally, the
resulting image should resemble the view from an aircraft
looking at a terrain on a sunny day with a bit of haze in
the valleys.

<h3>The Process</h3>

Each map cell is processed individually. First, the working
color is set to the color of the corresponding cell in the
map layer chosen to represent <i>hue</i>.  Second, this
color is multiplied by the <i>red</i> intensity of that
cell in the <i>intensity</i> map layer.  This map layer
should have an appropriate gray-scale color table
associated with it. You can ensure this by using the color
manipulation capabilities of
<em><a href="r.colors.html">r.colors</a></em>.
Finally, the color is made somewhat gray-based on the
<i>red</i> intensity of that cell in the
<i>saturation</i> map layer.  Again, this map layer
should have a gray-scale color table associated with it.

<h2>NOTES</h2>

The name is misleading. The actual conversion used is

<div class="code"><pre>
  <u>H</u>.i.s + <u>G</u>.(1-s)

where

  <u>H</u>   is the R,G,B color from the hue map
  i   is the red value from the intensity map
  s   is the red value from the saturation map
  <u>G</u>   is 50% gray (R = G = B = 0.5)

</pre></div>

<p>
Either (but not both) of the intensity or the saturation
map layers may be omitted. This means that it is possible
to produce output images that represent combinations of
<i>his, hi,</i> or <i>hs</i>.

The separate <i>red</i>, <i>green</i> and <i>blue</i>
maps can be displayed on the graphics monitor using
<em><a href="d.rgb.html">d.rgb</a></em>, or combined into
a composite RGB layer using
<em><a href="r.composite.html">r.composite</a></em>.

Users wishing to simply display an <i>his</i> composite
image without actually generating any layers should use the
program <em><a href="d.his.html">d.his</a></em>.


<h2>EXAMPLES</h2>

Recreate the following example for <em>d.his</em> using <em>r.his</em>.
First, create shaded relief and show it.

<div class="code"><pre>
g.region raster=elevation
r.relief input=elevation output=elevation_shaded_relief

d.mon wx0
d.his hue=elevation intensity=elevation_shaded_relief brighten=50
</pre></div>

Second, compute lighter version of color of shaded relief.
Then convert from HIS model to RGB and show the result.

<div class="code"><pre>
r.mapcalc "elevation_shaded_relief_bright_50 = #elevation_shaded_relief * 1.5"
r.colors elevation_shaded_relief_bright_50 color=grey255
r.his hue=elevation intensity=elevation_shaded_relief_bright_50 \
      red=shadedmap_r green=shadedmap_g blue=shadedmap_b

d.mon wx1
d.rgb red=shadedmap_r green=shadedmap_g blue=shadedmap_b
</pre></div>


<h2>SEE ALSO</h2>

<em>
<a href="d.his.html">d.his</a>,
<a href="d.colortable.html">d.colortable</a>,
<a href="d.rgb.html">d.rgb</a>,
<a href="r.blend.html">r.blend</a>,
<a href="r.colors.html">r.colors</a>,
<a href="r.composite.html">r.composite</a>,
<a href="r.mapcalc.html">r.mapcalc</a>,
<a href="r.shade.html">r.shade</a>,
<a href="i.his.rgb.html">i.his.rgb</a>,
<a href="i.rgb.his.html">i.rgb.his</a>
</em>

<h2>AUTHOR</h2>

Glynn Clements (based upon <em><a href="d.his.html">d.his</a></em>)

<!--
<p>
<i>Last changed: $Date$</i>
-->
